package com.hx.company.util;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStream;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;

/**
 * Created by Caimogu on 2016/4/21.
 */
public class String2Pic {

        private String fileString;
        public String2Pic(String fileString){
            this.fileString = fileString;
        }

        public void savePic() {

            File file = new File("/mnt/sdcard/Pictures/test.png");
          
            try{

                OutputStream os = new FileOutputStream(file);

                os.write(fileString.getBytes());

                os.flush();

                os.close();
            

            }catch(Exception e){
                e.printStackTrace();
            }



        }




}
